package com.hltlq.service.impl;

import java.util.List;

import com.hltlq.dao.UserDao;
import com.hltlq.model.TbUsers;
import com.hltlq.service.UserService;

public class UserServiceImpl implements UserService{
	private UserDao userDao;
	
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

	public boolean checkUser(String name, String password) {
		return userDao.checkUser(name, password);
	}

	public TbUsers currentUser(String name,String password){
		return userDao.currentUser(name, password);
	}
	
	public boolean updateUser(TbUsers user){
		return userDao.updateUser(user);
	}

	public List<TbUsers> usersList() {
		return userDao.usersList();
	}
	
	public void saveUser(TbUsers user){
		userDao.saveUser(user);
	}
	
	public TbUsers getUserById(Integer id){
		return userDao.getUserById(id);
	}
	
	public void delete(TbUsers user){
		userDao.delete(user);
	}
	
	public boolean checkUserName(Integer id,String name){
		return userDao.checkUserName(id,name);
	}
}
